package com.tkmybatis.starter;

import com.tkmybatis.config.redis.RedisUtils;
import com.tkmybatis.hfy.utils.UUIDGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * Project_name: tk_mybatis_demo
 * Company: 新致软件
 * Author: ZHU YU WEI
 * Date: Created in 18:12 2021/4/5.
 * Description:
 * Modified By:
 */
//@Component
@Slf4j
public class ApplicationStarter implements ApplicationListener {

    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        log.info("rabbitmq应用程序员初始化完成,启动完毕");
        RedisUtils.set("uuid", UUIDGenerator.randonUUID());
        log.info("redis缓存初始化完毕");

    }
}
